﻿using System;
using System.Reflection;
using ProjScan.RecordManager.AssetData;
using ProjScan.ScanRule.Attr;
using UnityEditor;

namespace ProjScan.ScanRule.SceneCheck
{
	// Token: 0x020001AF RID: 431
	[ScenesCheckRuleAttr]
	internal class Scene_PrefabType : SceneObjRecordRuleImp
	{
		// Token: 0x06000E64 RID: 3684 RVA: 0x00041A78 File Offset: 0x0003FC78
		protected override bool IsOK(SceneObjAssetData assetData)
		{
			Type typeFromHandle = typeof(PrefabUtility);
			MethodInfo method = typeFromHandle.GetMethod("GetPrefabInstanceStatus", BindingFlags.Static | BindingFlags.Public);
			bool flag = method != null;
			bool result;
			if (flag)
			{
				object[] parameters = new object[]
				{
					assetData.gameObj
				};
				int num = (int)method.Invoke(null, parameters);
				result = (num != 2 && num != 3);
			}
			else
			{
				MethodInfo method2 = typeFromHandle.GetMethod("GetPrefabType", BindingFlags.Static | BindingFlags.Public);
				bool flag2 = method2 != null;
				if (flag2)
				{
					object[] parameters2 = new object[]
					{
						assetData.gameObj
					};
					int num2 = (int)method2.Invoke(null, parameters2);
					result = (num2 != 5 && num2 != 6 && num2 != 7);
				}
				else
				{
					result = true;
				}
			}
			return result;
		}
	}
}
